package com.example.homework8.bean;


import com.example.homework8.R;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;

public class PlanInfo {
    public long rowid; // 行号
    public String name; // 名称
    public String info; // 描述
    public String cate; // 分类
    public String createtime; // 价格
    public String username; // 用户名称


    public PlanInfo() {
        rowid = 0L;
        name = "";
        info = "";
        cate = "";
        SimpleDateFormat ft = new SimpleDateFormat ("yyyy-MM-dd hh:mm:ss");
        createtime =   ft.format(new Date());
    }

    @Override
    public String toString() {
        return "RecordInfo{" +
                "rowid=" + rowid +
                ", name='" + name + '\'' +
                ", info='" + info + '\'' +
                ", cate='" + cate + '\'' +
                ", createtime='" + createtime + '\'' +
                ", username='" + username + '\'' +
                '}';
    }

    // 声明一个商品的名称数组
    private static String[] mNameArray = {
            "c++", "website",
            "vue","c++",
            "linux", "python","work","work"
    };
    // 声明一个商品的名称数组
    private static  String defaultusername =  "user1";
    // 声明一个商品的描述数组
    private static String[] mInfoArray = new String[]{
            "完成c++部分程序",
            "网站上线",
            "完成vue部分内容",
            "记住让客户签收c++程序，再入账",
            "不可忘记rm命令的功能。",
            "学习python spark编程。",
            "上报任务进度时候，要简短，精准。",
            "跟客户谈需求，需要深入了解各方面需求功能！"
    };
    // 声明一个商品的价格数组
    // 声明一个商品的小图数组
    private static int[] mPicArray = {
            R.drawable.a, R.drawable.b, R.drawable.c,
            R.drawable.d, R.drawable.e, R.drawable.f, R.drawable.g, R.drawable.h,
    };
    //  mPicArray
    private static int[] mThumbArray = {
            R.drawable.a, R.drawable.b, R.drawable.c,
            R.drawable.d, R.drawable.e, R.drawable.f, R.drawable.g, R.drawable.h,
    };
    //  mPicArray
    private static String[] cateArray = {
            "c++", "website",
            "vue","c++",
            "linux", "python","work","work"
    };
    public static ArrayList<PlanInfo> getDefaultList(String defname) {
        ArrayList<PlanInfo> RecordList = new ArrayList<PlanInfo>();
        for (int i = 0; i < mNameArray.length; i++) {
            PlanInfo info = new PlanInfo();
            info.name = mNameArray[i];
            info.info = mInfoArray[i];
            info.cate = cateArray[i];
            info.username = defname;
            RecordList.add(info);
        }
        return RecordList;
    }
}